{{ $ancestors := first .level (split .category.path " ") }}
{{ if eq ($ancestors | len) ((intersect $ancestors (split .parent " ")) | len) }}
  <ul style="margin-bottom:0;">
    <div>
      <a href="#posts-list-{{ .category.name | urlize }}" class="category-anchor" data-category="{{ .category.name }}" data-parent-categories="{{ delimit $ancestors "," }}"> / {{ .category.name }}</a>
    </div>
  {{ $index := (add .level 1) }}
  {{ $path := (printf "%s" .category.path) }}
  {{ range .scratch.GetSortedMapValues (printf "category-level-%d" $index) }}
    {{ partial "internal/recursive-categories-1.html" (dict "scratch" $.scratch "category" . "level" $index "parent" $path) }}
  {{ end }}
  </ul>
{{ end }}
